abstract class BagOStuff implements LoggerAwareInterface {
private $debugMode = false;
+ /** @var integer */
protected $lastError = self::ERR_NONE;
/**
/**
* Merge changes into the existing cache value (possibly creating a new one).
- * The callback function returns the new value given the current value (possibly false),
- * and takes the arguments: (this BagOStuff object, cache key, current value).
+ * The callback function returns the new value given the current value
+ * (which will be false if not present), and takes the arguments:
+ * (this BagOStuff, cache key, current value).
*
* @param string $key
* @param callable $callback Callback method to be executed
* Decrease stored value of $key by $value while preserving its TTL
* @param string $key
* @param int $value
- * @return int
+ * @return int|bool New value or false on failure
*/
public function decr( $key, $value = 1 ) {
return $this->incr( $key, - $value );